<%@page import="ch.rheintalconnection.sysventory.technicalServices.hibernate.MySqlDataReader"%>
<%@page import="ch.rheintalconnection.sysventory.technicalServices.IDataReader"%>
<%@page import="ch.rheintalconnection.sysventory.presentation.*"%>
<%@page import="ch.rheintalconnection.sysventory.businessServices.*"%>
<%@page import="ch.rheintalconnection.sysventory.domain.*"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%! Bootstrapper bootstrapper = new Bootstrapper(); %>

<%
	ScanningService scanningService = bootstrapper.getScanningService();
Scan scan = scanningService.scanAndStore();
%>

<%List<Scan> scans = bootstrapper.getDataReader().selectAll(); %>

<html>
<body>
<h1>Sysventory</h1>
<h2>Scanner</h2>
<p>Scan wurde gestartet um: <%= scan.getStartDate().toString() %></p>
<p>Scan wurde beendet um: <%= scan.getEndDate().toString() %></p>
<br>
<h2>Scan-Entries</h2>
<%for (Scan scanEntry : scans) {
			out.write("<p>Scan with id " + scanEntry.getId()
					+ ", made at "+scanEntry.getEndDate().toString()+" has been readed from the database.</p>");
}%>
</body>
</html>
